#pragma once


#include "MTCProto.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

class CFrameBase
{
public:
	CFrameBase();
	~CFrameBase();
protected:
	int SendFrame(uint32_t ctrl, void * payload
		, int payload_size
		, void * data, int datasize);
	int RecvResponse(void * buffer, int len);
	int mp_packet_header(
		INOUT void *	buffer,
		IN uint32_t    MTCP,
		IN uint32_t	   CTRL,   //  packet control id (defined below)
		IN uint32_t    PLEN,   //  payload length (if any), CTRL specific
		IN uint16_t    ERRC,   //  valid only for backward packet, tMTCP_ERR code (defined below)
		IN uint8_t     SEQN    //  forward packet sequence number
	);
};

